import { defineStore } from "pinia";
import { ref } from "vue";

export const cesiumListlInfoStore = defineStore('cesiumListInfo', () => {
  const cesiumRoundInfo = ref<number>(1);
  const cesiumTuiyanTime = ref<number>(0);
  const task_id = ref<string>('');

  function setCesiumRoundInfo(round: number) {
    cesiumRoundInfo.value = round;
  }

  function setCesiumTuiyanTime(time: number) {
    cesiumTuiyanTime.value = time;
  }

  function getCesiumRoundInfo() {
    return cesiumRoundInfo.value;
  }

  function getCesiumTuiyanTime() {
    return cesiumTuiyanTime.value;
  }

  function setTaskId(id: string) {
    task_id.value = id;
  }

  function getTaskId() {
    return task_id.value;
  }

  return {
    cesiumRoundInfo,
    cesiumTuiyanTime,
    task_id,
    setCesiumRoundInfo,
    setCesiumTuiyanTime,
    getCesiumRoundInfo,
    getCesiumTuiyanTime,
    setTaskId,
    getTaskId
  }
})